package com.huawei.appmarket.service.export;

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import o.ayw;
import o.ayy;
import o.cey;
import o.cfi;
import o.dim;
import o.dyc;
import o.dye;
import o.eqf;

public abstract class CommonExportedActivity extends FragmentActivity implements cey {
    cfi ˋॱ;
    private final String ˏॱ = getClass().getSimpleName();
    private dyc ॱˊ;

    protected abstract void ʼ();

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ayy.ˋ().ˎ(getWindow());
        ayw.ॱ((Activity) this);
        ͺ();
        ˋ(bundle);
    }

    protected void ॱॱ() {
        if (this.ˋॱ != null) {
            this.ˋॱ.ˋ();
        }
    }

    protected cfi ᐝ() {
        return null;
    }

    protected void ͺ() {
        this.ˋॱ = ᐝ();
        if (this.ˋॱ == null) {
            this.ˋॱ = new cfi(this);
            this.ˋॱ.ˏ(new dye(this));
            this.ˋॱ.ˏ(new eqf(this));
            this.ˋॱ.ˏ(new dim(this));
        }
        this.ॱˊ = this.ˋॱ;
    }

    public void al_() {
        ʼ();
    }

    public void ˎ() {
        finish();
    }

    protected void ˋ(Bundle bundle) {
        if (bundle != null) {
            this.ॱˊ.restoreSavedInstanceState(bundle);
        }
    }

    public void onSaveInstanceState(Bundle bundle) {
        if (bundle != null) {
            this.ॱˊ.onSaveInstanceState(bundle);
            super.onSaveInstanceState(bundle);
        }
    }

    public void onDestroy() {
        super.onDestroy();
        this.ॱˊ.onDestroy();
    }

    @TargetApi(23)
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        this.ॱˊ.onRequestPermissionsResult(i, strArr, iArr);
    }
}
